//随机成生成一个从fromNum到toNum之间的数,顺序可以颠倒
export function generateRandomNumInScope(fromNum, toNum) {
  let temp = Math.abs(toNum - fromNum) + 1
  let smallNum = fromNum
  if(toNum < fromNum) {
    smallNum = toNum
  }
  return Math.floor(Math.random() * temp + smallNum)
}